import type { Ref, InjectionKey } from 'vue'
export type NameType = string | number
export interface CollapseItemProps {
  name: string | number
  title?: string
  disabled?: boolean
}
export interface CollapseProps {
  modelValue: NameType[]
  accordion?: boolean
  onChange?: () => void
}
export interface CollapseContext {
  activeNames: Ref<NameType[]>
  handleItemClick: (name: NameType) => void
}
export interface CollapseEmits {
  // 'update:modelValue': [values: NameType[]]
  // change: [values: NameType[]]
  (e: 'update:modelValue', values: NameType[]): void
  (e: 'change', values: NameType[]): void
}
export const collapseContextKey: InjectionKey<CollapseContext> =
  Symbol('collapseContext')
